<?php
namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class ActivityJoin extends Model
{
    public $table = 'activity_join';

    protected $fillable = [
    	'id',
        'wechat_id',
        'activity_id',
    ];

    public  function activity()
    {
        return $this->hasOne(Activity::class,'id','activity_id');
    }

    public  function user()
    {
        return $this->hasOne(UsersWechat::class,'id','wechat_id');
    }

    public  function userProfile()
    {
        return $this->hasOne(UserProfile::class,'wechat_id','wechat_id');
    }
}
